﻿cmake_minimum_required(VERSION 3.19)
project(screenShot LANGUAGES CXX)

set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)

find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets AxContainer)

qt_standard_project_setup()

qt_add_executable(screenShot
    WIN32 MACOSX_BUNDLE
    main.cpp
    mainwindow.cpp
    mainwindow.h
    mainwindow.ui
    ScreenshotOverlay.cpp
    ScreenshotOverlay.h
    ScreenshotTool.cpp
    ScreenshotTool.h   
    ImageLabel.cpp
    ImageLabel.h
    HoverButton.cpp
    HoverButton.h
    ReportGenerator.cpp
    ReportGenerator.h
    MarkableImage.cpp
    MarkableImage.h
    Attribute.cpp
    Attribute.h
    Attribute.ui
    Common.h
)

target_link_libraries(screenShot
    PRIVATE
        Qt::Core
        Qt::Widgets
        Qt::AxContainer
)

include(GNUInstallDirs)

install(TARGETS screenShot
    BUNDLE  DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

qt_generate_deploy_app_script(
    TARGET screenShot
    OUTPUT_SCRIPT deploy_script
    NO_UNSUPPORTED_PLATFORM_ERROR
)
install(SCRIPT ${deploy_script})
